home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 3 / 003.d81 / tables & people (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  1KB  |  44 lines

  1. 5 poke53280,4:poke53281,4:print"[144][147]"
  2. 10 fori=1to7:reada$(i):next
  3. 15 s$="[144]":t$=""
  4. 20 fori=1to6:readb(i),c(i),d(i):next
  5. 100 a=int(6*rnd(1)+1):b=int(6*rnd(1)+1):c=int(6*rnd(1)+1):d=int(6*rnd(1)+1)
  6. 110 gosub900
  7. 130 print"";
  8. 140 ta=0:pe=0
  9. 150 ifa/2<>int(a/2)thenta=1:pe=a-1
  10. 160 ifb/2<>int(b/2)thenta=ta+1:pe=pe+b-1
  11. 170 ifc/2<>int(c/2)thenta=ta+1:pe=pe+c-1
  12. 180 ifd/2<>int(d/2)thenta=ta+1:pe=pe+d-1
  13. 185 ifte=1then300
  14. 190 print"[144]there ";:ifta=1thenprint"is 1 table."
  15. 200 ifta<>1thenprint"are"ta"tables."
  16. 210 print"there are"pe"people at the table";:ifta<>1thenprint"s";
  17. 220 print"."
  18. 230 print"hit any key, t to test theory, e to end"
  19. 240 geta$:ifa$=""then240
  20. 250 ifa$<>"t"anda$<>"e"then100
  21. 260 ifa$="t"thente=1:sc=0:goto100
  22. 270 goto63000
  23. 300 input"how many tables";t
  24. 310 input"how many people";p
  25. 320 ift<>taorp<>pethente=0:print"sorry, i don't think you have it!":goto190
  26. 330 print"very good!":sc=sc+1:ifsc=5thenprint"[147]i think you've solved it!"
  27. 331 goto63000
  28. 340 print"hit any key to continue"
  29. 350 geta$:ifa$=""then350
  30. 360 goto100
  31. 900 rem a, b, c, and d are numbers
  32. 905 print"[147]"
  33. 910 printt$;a$(1);a$(1);s$;a$(1);a$(1)
  34. 915 printt$;a$(b(a));a$(b(b));s$;a$(b(c));a$(b(d))
  35. 920 printt$;a$(c(a));a$(c(b));s$;a$(c(c));a$(c(d))
  36. 925 printt$;a$(d(a));a$(d(b));s$;a$(d(c));a$(d(d))
  37. 930 printt$;a$(7);a$(7);s$;a$(7);a$(7)
  38. 940 return
  39. 1000 data"[213][195][195][195][201]  ","[194]   [194]  ","[194] [209] [194]  ","[194][209] [209][194]  ","[194][209]  [194]  ","[194]  [209][194]  ","[202][195][195][195][203]  "
  40. 1010 data2,3,2,5,2,6,5,3,6,4,2,4,4,3,4,4,4,4
  41. 63000 print"[147]"
  42. 63005 print"load"chr$(34)"payload"chr$(34)",8":print"run"
  43. 63010 poke631,13:poke632,13:poke198,2:end
  44.